package com.chixing.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.chixing.entity.Flow;
import com.chixing.mapper.FlowMapper;
import com.chixing.service.IFlowService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author shy
 * @since 2022-11-02
 */
@Service
public class FlowServiceImpl extends ServiceImpl<FlowMapper, Flow> implements IFlowService {
    @Autowired
    private FlowMapper flowMapper;

    @Override
    public Flow getById(Integer orderId) {
        QueryWrapper<Flow> queryWrapperFlow = new QueryWrapper<>();
        queryWrapperFlow.eq("order_id", orderId);
        Flow flowSelect = flowMapper.selectOne(queryWrapperFlow);
        return flowSelect;
    }
}
